//
//  YEShiYongView.m
//  NBProduct
//
//  Created by 张铁军 on 16/4/6.
//  Copyright (c) 2016年 ping. All rights reserved.
//

#import "YEShiYongView.h"

@implementation YEShiYongView


-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
    }
    
    return self;
}

-(void)initView{
    self.backgroundColor = [UIColor whiteColor];
    _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 65, self.height)];
    _nameLabel.font = [UIFont systemFontOfSize:13];
    _nameLabel.text = @"余额支付:";
    [self addSubview:_nameLabel];
    
    
    _moneyLabel = [[UILabel alloc]initWithFrame:CGRectMake(_nameLabel.right, _nameLabel.top, KScreenWidth - 150 , self.height)];
    _moneyLabel.font = [UIFont systemFontOfSize:13];
    _moneyLabel.textAlignment = NSTextAlignmentRight;
    
    [self addSubview:_moneyLabel];
    
    _mySwith = [[UISwitch alloc]initWithFrame:CGRectMake(_moneyLabel.right + 10, 10 , 50,   30)];
    [self addSubview:_mySwith];
    
    UILabel *fenGe = [[UILabel alloc]initWithFrame:CGRectMake(0, self.height - 1, KScreenWidth, 1)];
    fenGe.backgroundColor = LIGHTGRAYBACKCOLOR;
    [self addSubview:fenGe];
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
